package com.xinfan.io.properties;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 * @Author xin
 * @Date 2022/6/9 11:17
 * @Version 1.0
 */
public class Properties_ {
    public static void main(String[] args) {
        //传统方法读取配置文件
        tradition();
    }

    public static void tradition() {
        BufferedReader br = null;
        try {
            String line;
            br = new BufferedReader(new FileReader("src\\mysql.properties"));

            while ((line = br.readLine()) != null) {
                System.out.println(line);
            }

        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                br.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
